export default ({$axios}, inject) => {

  inject(`queryHotQuerstionList`, data => $axios.$post(`/blogServer/question/pageQuery/hot`, data))

  inject(`queryNewQuerstionList`, data => $axios.$post(`/blogServer/question/pageQuery/new`, data))

  inject(`queryWaitQuerstionList`, data => $axios.$post(`/blogServer/question/pageQuery/wait`, data))

  // 查询问题详情
  /*inject(`getQuestionById`, id => $axios.$get(`/mock/question/api/question/${id}`))*/

  inject(`getQuestionById`, id => $axios.$get(`/blogServer/question/questionDetailById/${id}`))

  inject(`updateQuestionViewCount`, id => $axios.$get(`/blogServer/question/updateQuestionViewCountById/${id}`))

  inject(`getQuestionReplayById`, questionId => $axios.$get(`/blogServer/question/getQuestionReplayById/${questionId}`))

  inject(`updateQuestionThumb`, (questionId, count) => $axios.$get(`/blogServer/question/updateQuestionThumbById/${questionId}/${count}`))

  inject(`insertQuestionReplay`, data => $axios.$post(`/blogServer/question/insertOrUpdateQuestionReplay`, data))

  inject(`deleteQuestionReplayById`, id => $axios.$post(`/blogServer/question/deleteCommentById/${id}`))

  inject(`insertOrUpdateQuestion`, data => $axios.$post(`/blogServer/question/insertOrUpdate`,data))

  inject(`queryQuestionByLabelId`, (data) => $axios.$post(`/blogServer/question/pageQuestionByLabelId`,data))

}
